package com.zhonghui.modlules.user.eshopDomain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;

@TableName("user_bill")
public class UserBill {
    @TableId
    private Long id;
    private Long uid;
    private String linkId;
    private Integer pm;
    private String title;
    private String category;
    private String type;
    private BigDecimal number;
    private BigDecimal balance;
    private String mark;
    private Integer status;

    public void copy(UserBill source) {
        BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
    }

    public static UserBill.UserBillBuilder builder() {
        return new UserBill.UserBillBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public Long getUid() {
        return this.uid;
    }

    public String getLinkId() {
        return this.linkId;
    }

    public Integer getPm() {
        return this.pm;
    }

    public String getTitle() {
        return this.title;
    }

    public String getCategory() {
        return this.category;
    }

    public String getType() {
        return this.type;
    }

    public BigDecimal getNumber() {
        return this.number;
    }

    public BigDecimal getBalance() {
        return this.balance;
    }

    public String getMark() {
        return this.mark;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setUid(final Long uid) {
        this.uid = uid;
    }

    public void setLinkId(final String linkId) {
        this.linkId = linkId;
    }

    public void setPm(final Integer pm) {
        this.pm = pm;
    }

    public void setTitle(final String title) {
        this.title = title;
    }

    public void setCategory(final String category) {
        this.category = category;
    }

    public void setType(final String type) {
        this.type = type;
    }

    public void setNumber(final BigDecimal number) {
        this.number = number;
    }

    public void setBalance(final BigDecimal balance) {
        this.balance = balance;
    }

    public void setMark(final String mark) {
        this.mark = mark;
    }

    public void setStatus(final Integer status) {
        this.status = status;
    }

    public String toString() {
        return "UserBill(id=" + this.getId() + ", uid=" + this.getUid() + ", linkId=" + this.getLinkId() + ", pm=" + this.getPm() + ", title=" + this.getTitle() + ", category=" + this.getCategory() + ", type=" + this.getType() + ", number=" + this.getNumber() + ", balance=" + this.getBalance() + ", mark=" + this.getMark() + ", status=" + this.getStatus() + ")";
    }

    public UserBill(final Long id, final Long uid, final String linkId, final Integer pm, final String title, final String category, final String type, final BigDecimal number, final BigDecimal balance, final String mark, final Integer status) {
        this.id = id;
        this.uid = uid;
        this.linkId = linkId;
        this.pm = pm;
        this.title = title;
        this.category = category;
        this.type = type;
        this.number = number;
        this.balance = balance;
        this.mark = mark;
        this.status = status;
    }

    public UserBill() {
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserBill)) {
            return false;
        } else {
            UserBill other = (UserBill)o;
            if (!other.canEqual(this)) {
                return false;
            } else if (!super.equals(o)) {
                return false;
            } else {
                label145: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label145;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label145;
                    }

                    return false;
                }

                Object this$uid = this.getUid();
                Object other$uid = other.getUid();
                if (this$uid == null) {
                    if (other$uid != null) {
                        return false;
                    }
                } else if (!this$uid.equals(other$uid)) {
                    return false;
                }

                Object this$pm = this.getPm();
                Object other$pm = other.getPm();
                if (this$pm == null) {
                    if (other$pm != null) {
                        return false;
                    }
                } else if (!this$pm.equals(other$pm)) {
                    return false;
                }

                label124: {
                    Object this$status = this.getStatus();
                    Object other$status = other.getStatus();
                    if (this$status == null) {
                        if (other$status == null) {
                            break label124;
                        }
                    } else if (this$status.equals(other$status)) {
                        break label124;
                    }

                    return false;
                }

                Object this$linkId = this.getLinkId();
                Object other$linkId = other.getLinkId();
                if (this$linkId == null) {
                    if (other$linkId != null) {
                        return false;
                    }
                } else if (!this$linkId.equals(other$linkId)) {
                    return false;
                }

                Object this$title = this.getTitle();
                Object other$title = other.getTitle();
                if (this$title == null) {
                    if (other$title != null) {
                        return false;
                    }
                } else if (!this$title.equals(other$title)) {
                    return false;
                }

                label103: {
                    Object this$category = this.getCategory();
                    Object other$category = other.getCategory();
                    if (this$category == null) {
                        if (other$category == null) {
                            break label103;
                        }
                    } else if (this$category.equals(other$category)) {
                        break label103;
                    }

                    return false;
                }

                Object this$type = this.getType();
                Object other$type = other.getType();
                if (this$type == null) {
                    if (other$type != null) {
                        return false;
                    }
                } else if (!this$type.equals(other$type)) {
                    return false;
                }

                label89: {
                    Object this$number = this.getNumber();
                    Object other$number = other.getNumber();
                    if (this$number == null) {
                        if (other$number == null) {
                            break label89;
                        }
                    } else if (this$number.equals(other$number)) {
                        break label89;
                    }

                    return false;
                }

                Object this$balance = this.getBalance();
                Object other$balance = other.getBalance();
                if (this$balance == null) {
                    if (other$balance != null) {
                        return false;
                    }
                } else if (!this$balance.equals(other$balance)) {
                    return false;
                }

                Object this$mark = this.getMark();
                Object other$mark = other.getMark();
                if (this$mark == null) {
                    if (other$mark == null) {
                        return true;
                    }
                } else if (this$mark.equals(other$mark)) {
                    return true;
                }

                return false;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserBill;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = super.hashCode();
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $uid = this.getUid();
        result = result * 59 + ($uid == null ? 43 : $uid.hashCode());
        Object $pm = this.getPm();
        result = result * 59 + ($pm == null ? 43 : $pm.hashCode());
        Object $status = this.getStatus();
        result = result * 59 + ($status == null ? 43 : $status.hashCode());
        Object $linkId = this.getLinkId();
        result = result * 59 + ($linkId == null ? 43 : $linkId.hashCode());
        Object $title = this.getTitle();
        result = result * 59 + ($title == null ? 43 : $title.hashCode());
        Object $category = this.getCategory();
        result = result * 59 + ($category == null ? 43 : $category.hashCode());
        Object $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $number = this.getNumber();
        result = result * 59 + ($number == null ? 43 : $number.hashCode());
        Object $balance = this.getBalance();
        result = result * 59 + ($balance == null ? 43 : $balance.hashCode());
        Object $mark = this.getMark();
        result = result * 59 + ($mark == null ? 43 : $mark.hashCode());
        return result;
    }

    public static class UserBillBuilder {
        private Long id;
        private Long uid;
        private String linkId;
        private Integer pm;
        private String title;
        private String category;
        private String type;
        private BigDecimal number;
        private BigDecimal balance;
        private String mark;
        private Integer status;

        UserBillBuilder() {
        }

        public UserBill.UserBillBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public UserBill.UserBillBuilder uid(final Long uid) {
            this.uid = uid;
            return this;
        }

        public UserBill.UserBillBuilder linkId(final String linkId) {
            this.linkId = linkId;
            return this;
        }

        public UserBill.UserBillBuilder pm(final Integer pm) {
            this.pm = pm;
            return this;
        }

        public UserBill.UserBillBuilder title(final String title) {
            this.title = title;
            return this;
        }

        public UserBill.UserBillBuilder category(final String category) {
            this.category = category;
            return this;
        }

        public UserBill.UserBillBuilder type(final String type) {
            this.type = type;
            return this;
        }

        public UserBill.UserBillBuilder number(final BigDecimal number) {
            this.number = number;
            return this;
        }

        public UserBill.UserBillBuilder balance(final BigDecimal balance) {
            this.balance = balance;
            return this;
        }

        public UserBill.UserBillBuilder mark(final String mark) {
            this.mark = mark;
            return this;
        }

        public UserBill.UserBillBuilder status(final Integer status) {
            this.status = status;
            return this;
        }

        public UserBill build() {
            return new UserBill(this.id, this.uid, this.linkId, this.pm, this.title, this.category, this.type, this.number, this.balance, this.mark, this.status);
        }

        public String toString() {
            return "UserBill.UserBillBuilder(id=" + this.id + ", uid=" + this.uid + ", linkId=" + this.linkId + ", pm=" + this.pm + ", title=" + this.title + ", category=" + this.category + ", type=" + this.type + ", number=" + this.number + ", balance=" + this.balance + ", mark=" + this.mark + ", status=" + this.status + ")";
        }
    }
}

